package com.boyan.product.service.impl;

import com.boyan.product.bean.Product;
import com.boyan.product.service.ProductService;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.concurrent.TimeUnit;


@Service
public class ProductServiceImpl implements ProductService {
    @Override
    public Product getProductById(Long id) {

//        try {
//            TimeUnit.SECONDS.sleep(100);
//        } catch (InterruptedException e) {
//            throw new RuntimeException(e);
//        }



        return new Product(id,new BigDecimal(99), "苹果"+id, 2);

    }
}
